package gui_classes;

import java.awt.*;

import javax.swing.*;

import domain.*;

public class PatientPage extends DERPBase {
	
	// these panels are put into other panels
	private UsersPagePanel upanel;
	private PatientsPagePanel ppanel;
	private PatientsPageTwoPanel ppanel2;

	

	/**
	 * Create the panel.
	 */
	public PatientPage(Patient pat) {

		setPreferredSize(new Dimension(600,510));
		setLayout(new BorderLayout());
		
		upanel = new UsersPagePanel((User)pat);
	//	upanel.setAttr((User)user);
		add(upanel, BorderLayout.NORTH);
		
		ppanel = new PatientsPagePanel(pat);
	//	ppanel.setAttr(user);
		add(ppanel, BorderLayout.WEST);
		
		ppanel2 = new PatientsPageTwoPanel(pat);
		add(ppanel2, BorderLayout.EAST);
		
		setPrevious(GUI_Main.lpanel);		
	}
	
	public void display()
	{
		GUI_Main.replacePanel(this);
	}
	
	public void displayPrev()
	{
		GUI_Main.start();
	}
	
	public PatientsPageTwoPanel getPanelTwo()
	{
		return this.ppanel2;
	}

}
